//// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
//package com.linqingying.gitcode.pullrequest.action
//
//import com.intellij.collaboration.messages.CollaborationToolsBundle
//import com.intellij.openapi.actionSystem.ActionUpdateThread
//import com.intellij.openapi.actionSystem.AnActionEvent
//import com.intellij.openapi.project.DumbAwareAction
//import com.linqingying.gitcode.i18n.GitCodeBundle
//
//private class GCPROpenPullRequestTimelineAction
//  : DumbAwareAction(CollaborationToolsBundle.messagePointer("review.details.view.timeline.action"),
//                    GitCodeBundle.messagePointer("pull.request.view.conversations.action.description")) {
//
//  override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.BGT
//
//  override fun update(e: AnActionEvent) {
//    val vm = e.getData(GCPRActionKeys.PULL_REQUESTS_PROJECT_VM)
//    val id = e.getData(GCPRActionKeys.PULL_REQUEST_ID)
//
//    e.presentation.isEnabled = vm != null && id != null
//  }
//
//  override fun actionPerformed(e: AnActionEvent) {
//    val vm = e.getData(GCPRActionKeys.PULL_REQUESTS_PROJECT_VM) ?: return
//    val id = e.getData(GCPRActionKeys.PULL_REQUEST_ID) ?: return
//
//    vm.openPullRequestTimeline(id, true)
//  }
//}
